Cleanup Resource Manager
Refactorings and more cleanup
Merge remote-tracking branch 'origin' into kdev