Removes trailing whitespace, fixes tree arrows.