MAINT: cluster: Remove unused imports, unused variables and commented-out code from hierarchy.py

A bit of spring cleaning.