first major work on serialization branch

currently broken in at least 8 known places. will repair those next.