Finished the plugin part.