refactored toolbar_component to prototypical inheritance.