Move some functions to the VirtualMachine class