Added trim() to the title names in to.object