Labelled generic codecs

Generic labelling with programs. Functional.

Thanks @travisbrown, wouldn't of got it without your help.