Added a new empty() function to the query and updated syntax in the tree class