#KJ-81 Extend the semantics to work in either full mode or prep+exec. Corrected bugs in the previous commit.