Split into encode and decode callables