Small changes to clustering algorithm: handle lowest degree nodes first and keep track of all nodes adjacent to the current cluster