Reorganization for django tests to run. Also corrected bug in
serialization of string fields.