moved ohigui's AggregateLayers.R into ohicore