Added the apache license info
removed for in loops to use each
fixed active state on tabs
cleaned up code, removed console.logs and commented out code