Changed to Python3 and fixed errors.