rewrite assetmanager.cpp to reflect recent changes