Simplify the terminal size/layout logic