Add some more math and geom functions
fix a circle-circle test bug
remove some dead code