adding vm shutdown and nock

adding vm shutdown
nock
code refactory