Added VPM, fixed bugs