Fixed a bug in management thread. Added a bit of Javadoc to PluginManager.