Serializes code to be submited