remove trailing empty lines
remove trailing whitespaces