Added class to optimise the number of trees in the forest