Refactor Tier3 CPI for testability and implement first spec for has_vm?