Migrate plugin to avoid circular dependency