issue #34 fixed

* Inferred reference types assumed to be non-nullable
* Some re-factoring required