refactoring layouts to improve design