removed trailing whitespaces when saving a file; minor changes