cleaning up whitespace in index.  passing in g_root to g_input.