add decoders to snapshot file
hack together a ton of fixes to preserve library compile-ability