Refactored wrong controller to model