Initial refactor for avg() function for features
initial framework for avg() feature meta-function