Adds basic Python 3 compatibility