Refactored toolbar.js : Swapped factory functions with constructors for toolbar and item.