Some final changes, hopefully. Mostly query changes.