Broke out encode and decode functionality into independent services.