refactor layout settings