Py2.6 and Py3 Lib Compatibility

Fixed compatibility issues with Py3 without compromising Py2.6 integrity
(I think..)