Overhaul of the plugin.

This plugin worked on an older system, somehow. I have done an overhaul
to get it working on other systems.