Added layout switcher, some rules