cleans code (trailing blanks, cppcheck warnings)