Adjust root position when switching layout. Remove not used functions