Moved the resources code to includes
Merge pull request #3487 from LaurentGoderre/resources-include

Moved the resources code to includes