Integrated clustering into existing code.