Added control on tab switch, removed console.log(), modified accordion