Remove unused import
Generate Python 3 compatible code