move more stuff into SimpleQuery. fix deleting to close #7