Gator-16 Updated the Logic to trim the leading and trailing  whitespaces.

resolves #16