Remove leading and trailing spaces from goals