Refactor VMBuilder