Changes to simulation, along with altering certain functions to work with arbitrary number of compartments