More progress

Fixed the midpoint function and some of the other geometry. Almost
completed with the visibility compatibility.
Still have strange behavior but have a lot of the debugging completed.
The angle/scale/position compatibility are working well.