Assorted changes to allow testing with --noop.