Make sure global is something defined
Add inline comments to indicate function parameters