Prepare for v1 migration

A bunch of minor fixes or enhancements for issues which appear testing the v1 migration script.