Fixed and using new geom classes.
Fix unit tests.