Fixed Python 2.5 issues
Updates to support python 3