Bug fixes and modification of the multisim script to incorporate the maxAggregation field