Reformatted code through PyCharm.