Tweak module and class definitions to prevent scope leak.
Merge.