Resource manager refactoring