the aggregation/merge were improved and some dead code was removed
added events