Refactor to create SPVM