Massive reorg of shell code to allow scripts/shelleffects in prover shell