More fixes and more query additions.