Move export to top of file
Change to json responses for the api
Fix indenting, 2 spaces
Update tests, add a new test and fix indentation
Add a wrong branch test for the api and clean up some of the api code

Small test fixes
Add the auth middleware to the deploy api
Remove some commas from objects, baileystyle
Merge pull request #35 from webkom/json

Return JSON-responses from the API