An improved query system. And more comments!