tabs fix and javascript restructure
merge
Merge branch 'master' into gh-pages