Refactored Racer using template pattern.