Sort out clustering; get to a point where it at least compiles