Included unit testing of the plugin instantiation + minor refactoring