Added better py3 support