Refactored code (routes, search filter, show controller to model)