Move function descriptions into the struct, minor improvements to variable naming, use convention of 'g_' prefix for static vars.
Move function descriptions into the struct, minor improvements to variable naming, use convention of 'g_' prefix for static vars.