move aggregate to datatable
Cleanup. TODO: handle media