Add flatAppend and flatConcat methods to codec
Add target type to the Discriminator type; add demonstration of fixing subtype