Simplify layout code.