Extract aggregator.js from connection.js