Removing midlevel aggregations