Fix zsh double shift bug and cleaned up main gvm function code.
Fix selfupdate bug.