initial refactoring of a couple of the plugins