rescue the layertree content before close, remove dead code
Merge branch '3.0-design' of github.com:mapbender/mapbender into 3.0-design