Added some smaller adjustments so it can run on Python 3 (need to change a commented line though).