Added support for ordering by descending json uid, and fixed remaining misspellings of 'database' in the source