Implement basic VM

Next steps:
* Submatch extraction
* Simplify all those branching instructions