Added a trim feature to reduce memory taken by carbonflowmap