Enclosed VET in local scope, and removed unused functions