Adapted VM threads to multi-context; threads work, now I only have to move a few global variable to the context struct