Major code refactoring. Begin work on the Terran clustering algorithm