Finished refactoring database access using singleton queries.

* Fixed an issue where I incorrectly formulated update requests as taking
a function rather than an entity.
* Removed a bunch of uneeded code.
* Changed error handling for some success cases to ensure that the save was truly successful.