Snapshot 2 of ResourceManager overhaul.

most tests pass.