Fix model saving.
Add forgotten resource defn. files.
Profile setup.
It's DEBUG_MODE not DEBUG