Added pruning function and related dependencies