Moved toolbar logic to buttonToolbar