Minor refactor of g()

Cleaned it up.  Previous incarnation was a quick change from the
old old g().