   (vec (concat (repeat (inc x) (empty-cell char-attrs))
                (drop (inc x) line))))
 
-(defn clear-to-beginning-of-screen [{{x :x y :y} :cursor width :width height :height char-attrs :char-attrs :as vt}]
+(defn clear-to-beginning-of-screen [{{:keys [x y]} :cursor :keys [width height char-attrs] :as vt}]
   (update-in vt [:lines] (fn [lines]
                            (let [top-lines (repeat y (empty-line width char-attrs))
                                  curr-line (clear-line-left (nth lines y) x char-attrs)
                                  bottom-lines (drop (inc y) lines)]
                              (vec (concat top-lines [curr-line] bottom-lines))))))
 
-(defn clear-screen [{width :width height :height char-attrs :char-attrs :as vt}]
+(defn clear-screen [{:keys [width height char-attrs] :as vt}]
   (assoc-in vt [:lines] (empty-screen width height char-attrs)))
 
 (defn execute-ed [vt]

(defn execute-ht [vt]
  (move-cursor-to-next-tab vt 1))

(defn execute-lf [{height :height {y :y} :cursor :as vt}]
  (if (= height (inc y))
    (-> vt
        scroll-up

  (update-in vt [:lines] (fn [lines]
                           (conj (vec (drop 1 lines)) (empty-line width)))))

(defn scroll-down [{:keys [width height] :as vt}]
  (update-in vt [:lines] (fn [lines]
                           (vec (conj (take (dec height) lines) (empty-line width))))))

