Started refactoring to remove Engine class