Restructured index.js into "ga" module pattern