Add support for subclass of class.

Fixes #62 #63 #64