Add pruning methods and prune groups of zero and empty metadata