Small fixes, ddt->dt, rand state