Removed unnecessary functions
Applying 2to3 to add support for Python 3

I'm running `2to3` on the code, while keeping the changes compatible with
Python 2 using `six`. This will ensure the same code runs on both
versions.