VPAT tweaks

Closes #529, #530, #531. Almost ready to close #477.