Refactor py2d.Math
Fix indent
Partial python3 support