resource manager refactor