fixing trailing whitespaces,
other small cleanup