Refactor structure of vmrun completion