Api responder refactoring