Check if the resource definition is duplicated
Small fix: prefer exception and function call over sys.exit and direct access to attributes
Make everything actually pass the resources through
Merge branch 'extended_startup', for some fixes on core classes