Further simulation bugfixes, allow subclassing