apply structure changes and revamp Api responder/error response