Finished refactoring resource mapping.