Implemented direction classes and tests.