This is a massive simplification, fixes a couple endianness bugs (though not all of them I don't think), should give a speedup, gets rid of the `serialize_iter` crap.