Continue refactor. Cleanup the plugin in general. Full compat for 1.5.2 - 1.8+