Change variable names that lacked a g_ prefix

The test suite need to be modified to support these changes as well as
the emperor.js file.

This should fix #34