big refactor. tried to make all plugin config modular