Refactor mkV test script