edge.aggregator: Addressed review comments

Changed cookie generation and lots of cleanup.