Refactoring and new classes