Trim

Added the trim section to the code