misc bug fixes, updated math to use point_traits