Preliminary aggregation update

Fixing json aggregation for new database structure.

Still a couple of kinks to work out (call stack search doesn't work)