Added a readme file. Refactoring classes for readability and for ease of
unit testing.