add to layerchooser instead of the toolbox + code cleanup