Use GroupsTree on the side pannel of the homepage

This is just some minor refactoring of some partial templates that is useful for the implementation of caching and removing unnecessary code.

Previously requested as #839. Fixed styling issues.