Remove duplicate code of layout config block