Refactor routes to controllers
Prettify JSON