Some improvements on how to handle module encapsulation