Converted removeMenu to use the new query function