code cleanup, hooked static init to plugins_loaded