adding engine module and refactoring rover code