Fixed formatting, made it run in Python 3.