Code serialization format and context splitting