remove support for HTML responses; JSON only from here on in
reindent everything
move REST API into subdirectory
less ambiguous variable name
explain hash quoting in urls.php