Revised input/output code and have a few functions working in Python3.3
Backwards compatibility with Python2.7
Better compatibility