Slight modifications to use the plugin as a gem