Added trim to clean up empty spaces and respective tests.