refactoring ebusd plugin