Refactored some Race code and fixed a major mistake where the race doesn't end