Clean up appo controller to add correctly and display everything as json