remove trailing whitespace, fix indentation to 4 spaces