strip out some old stuff, add proper serialization