Added typeclass derivations to data definitions.