Removed superfluous trim utility functions. Replaced uses of them with the Boost ones.