Removed query class, (hopefully) fixed bugs in rs/query