Refactor toolbar.js to use consistent naming