Various tweaks to script
Preliminary VWF implemented
Better to do it like this, I think