Search For Long-Lived Particles That Decay To Muon Pairs At 13 Tev And An Algorithm To Improve Resolution In The Muon System Of The Compact Muon Solenoid