Variable name fix
Use only "hostgroups" and "servicegroups" queries
sql2json refactoring
Indent JSON output
Add DEBUG constant for debugging with test user
Add REQUEST_URI parser in addition to QUERY_STRING