This also caused renaming local variables to avoid conflicting with the wg package name itself.
Splitting into modules will help keep concerns separate, at the cost of a slightly more verbose code.