Carrot clustering + refactoring