Refactored code, added base classes for the project.