Fleshing out query functionality.