Extracted functionality to new classes