refactored outputwriter so that sorting is done in the HorseRacingService
removed unused imports and removed unnecessary whitespace