Refactoring and added new classes in the model