Migrated logic file to a plugin, with regex handlers