Cleaned up the code in AssetManager.h