Refactoring ResourceManager