Refactor the Vectorize module