vx refactoring & minor compilation fix