Implemented Trim

the appunite owner isn't responding to my pull request.
Are you interested in pulling the implementation of the trim?