[plugin #7] Add code for plugin and tests for it.

  Currently, there's a segfault when attempting to free the plugin from memory.