Py3k support

Python 3 support and removal of some unnecessary white-space.