Refactored to reflect the new VM and State