Remove some copy-and-pasted code in Geometry.cpp