Added nested averaging tool and meter functions