Refactoring changes

Finished unit tests and OO refactoring.