Long lost update

Finished the math backend and made some things look nicer.
TODO:
-format poly string in a better way
-fix the out of memory crash with too many points