Refactored bbar.coffee