Migration tool and fixes.