A few minor code cleanups  in VM