more grunt work and JS structure