Merge pull request #48 from carcam/master

Minor JS issues
thanks Carlos
Fixing several For loops to not calculate the size of the array on each iteration
Fixing several For loops to not calculate the size of the array on each iteration
No need to declare the tabs neither closing them
Fixed isset conditions