Updated PlugInManger

Updated the executor so that it will be used when it is needed and
destructed after.