Refactor toolbar integration