Complete refactor to create an instance of the plugin and expose public methods