Added support for nested types
Merge pull request #1 from nsainaney/master

Fixed support for nested types