vm code refactored, core code in vm constructor, and all possible code separated into utility modules