Adds basic query functionality.