The initial logic of the plugin.