Minor fixes

Use string.indexOf instead of _.indexOf  to find the selected tab
of a TabSet. Add bean.on as a utility function to support the use
of Backbone.History.