Upgraded to Python 3 and fixed Travis CI issues