Refactor: cluster.py module