implemented first pass at module visibility handling