Second commit, with refactory of VM class