Add core logic to plugin.