Partial work on custom codec