Add general purpose routines needed to process "lock-n-run" options, and more app code