Refactored AssetsManager.js