Cleaned up, and fixed all clustering algorithms and tests.