[minor] Rename `className` to `global`.
[minor] Code style changes and clean up.