Various small changes to speed up simulations