add support for nested aliases; refactor quantile 0.5 vs. median aliasing to use the nested structure