partition primary simulation loop into more logical steps