Open correct databases for chunk.php
More compact output for aggregation