migration changes and cleanup