Fix indentation and remove trailing whitespace