I think this line: `return if layout.nil?` can be safely removed.