refactoring layout menu