Python syntax fixes, and consistent trailing space.