refactoring layout resources