Adding more classes and refactoring