Added support for inheritance.
Merge pull request #20 from maciej-rosiek/master

Added support for type inheritance