Made significant changes to aggregator to fix sum, nan problem, decompose big matrices, etc.