Geometry testing, tweaks and merging