Added metadata, added median and mean as options