Simplify layout logic