Added new classes, refactoring code to separate out objects