Better Mux support. (Probably needs review. Uses some type trickery to prevent user having to define createMux functions on Data and subtypes)