Add paginator and separate search code in controller to service.