trim() all of the input the user provides

Change-Id: I74577315ca41ce9b8c34a099a47a62c848a2c8c4