a bit of a refractor, start of ResourceMgr