Fixed the simulation tests to work with new reference algorithm code