Flat layout fixes and enhancements