Add Python 3 support
Simplify parser
Separate repr and str methods
Fix demo.py