Split out VM into own lib.