geometry cleanup