Whew! The trimming algorithm was difficult!
...well not the trimming part but rearranging the database after removing tree cells from it to make room for more to grow. My phone starts to lag when the database has more than 5000 cells so I made that the limit on which the total allowed biomass is calculated.
Watch for a demo video in the next few days.