Changed routes so that they except JSON instead of individual params.
Added tests for API.  API is underconstruction.