Pushing up untested changes

This is the first pass at a restructuring of the plugin. Definitely not
ready yet, but I wanted to at least push it up.