Use an actual programming lanugage...
Move to OO style ADT.