Moved a query into a scope, did a little TomDoc-ing.