Moved class method queries to scope