Fix indent.
Remove trailing whitespaces.
More pythonic/efficient style.