[VM] code clean up