Refactor duplicate display and height lines.