Delete trailing spaces and extra lines