Clean up routes, fix JSON array issue.

JSON arrays are now correctly send to the server.