Fixing index tabs again, fixing js

javascript is very unstructured at the moment.