Remove trailing spaces and other debugging output