migration work and clean ups