Refactor and document AggregationOperation and ConsoleServer