    [:p (:snippet phone)]])
 
 (defn matches-query?
- [search-input phone]
- (if (= "" search-input)
-   true
-   (boolean (or
-             (re-find (re-pattern search-input) (:name phone))
-             (re-find (re-pattern search-input) (:snippet phone))))))
+  "checks if the search input matches a name or snippet of the given phone"
+  [search-input phone]
+  (if (= "" search-input)
+    true
+    (boolean (or
+              (re-find (re-pattern search-input) (:name phone))
+              (re-find (re-pattern search-input) (:snippet phone))))))
 
 (defn phones-component
+  "component for the list of phones"
   []
   (let [phones (re-frame/subscribe [:phones])
         search-input (re-frame/subscribe [:search-input])

   app-state))

(re-frame/register-handler
 :initialise-db             ;; usage: (dispatch [:initialise-db])
 (fn
   [_ _]                   ;; Ignore both params (db and v).

 (fn
   [app-state [_ phone-id response]]
   (println "Error getting phone detail for id: " phone-id)
   app-state))

(re-frame/register-handler
