Refactor controllers
Make error controller return as json
Parse application exceptions
Update exception to throw correct response code