Lots of changes here and there in both VM files to try and get all the use cases correct