Fix model saving.
Add forgotten resource defn. files.
Profile setup.
It's DEBUG_MODE not DEBUG
Merge remote-tracking branch 'upstream/master' into exportcsv
Date now works mostly