Remove empty lines, trailing whitespaces