updated js to tabs model
fixing merge conflicts
made tabs work when the ace script is not present