shortened the standardizeTypes function

it also removed trailing spaces