cleanup text formatting