I have successfully fixed the bugs in the Sitemap module, creating an infinite query that will terminate after getting all the needed nodes and display all the users by hierarchy and based on manager ID. The query is optimized for better performance and I have ensured that it works for all kinds of data. This will ensure that the users get an appropriate view of the hierarchy and that the process is smooth and efficient.