Added some tests for the engine and refactored the engine class with
some more specific movement codes.