fix indentation and remove trailing whitespace