executive code is separated from layout engine. dock contents remains when changing layout.
autoLayout function added