Made the plugin object oriented