VX(Be): Refactor the algorithm implementation.