added several helper classes to cache information, fixed plugin destruction race condition