adding support for top-type for exported, un-used vars
added support, need to run tests
OK, lets see which tests break...