Fixing run_trial ... again.
More testing code.
Some runtime fixes.