Various fixes

Also updated some deprecated APIs that apparently were used,
namely raw.data and the django conf.defaults stuff.