Enhancement of optimizing trim
Merge pull request #103 from maximkou/patch-98

Trim optimizing enhancement