Added interfaces for the main classes, which would allow them to be mocked in the unit tests.

Moved ExecuteCommand in a separate class to handle all commmands.