added persisting laps after race and cleaning up functions