more refactoring, and several more resources.