Modularize toolbar

Refactored #1579 a little bit and added docs