mars rover refactoring