Migrate code from common __init__.py.