Added trim title functionality