Simulation cleanup (hydro backport)

This branch was actually meant for hydro-devel.