Adds support for classes nested in objects, fixes #187