More refactoring. Start hooking up the VM and debugger