More updates to pluginmanager and hook, also start working on loader