Add write_concurrency true to aggregates table + Cleanup lookup code