Refactor, remove the vm related class