Correct indention, removing trailing spaces
Move a call to chomp() to the right place