Change how plugins are initialized
Code cleanup