Refactor assetmanager