Remove the mv flag from environment code.

* Env code flags removed.
* Additional cleanup.
* Turn off mv on by default.
this one supports options.immediate as well.