Minor refactoring in manage resources.