More nicely working with layer config in leafletcontrol