Clean up back-end. JSON data response.

Clenead up various inconcistencies in naming. Added JSON support for
routes. All POST routes now output JSON.