Fixed some bugs and tried to improve clustering.