refactor plugins, other stuff