Removing deprecated queries