Remove anonymous init and hook instance generation to plugins_loaded