Fixed bugs in time aggergation and also implemented method to remove subtrees from traces