Initial commit of averaging script