Cleanup VM code, move test code into a doctest setup
Cleanup parser code