 
     ; Get handshake
     (let [packet-id (red-byte conn)]
-      (handle-packet conn packet-id))
+      (read-packet conn packet-id))
 
     ; Send login
     (write-packet conn :login {:version 13 :username "timmy"})
 
     ; Get login
     (let [packet-id (red-byte conn)]
-      (handle-packet conn packet-id))
-
-   )
+      (read-packet conn packet-id)))
 
 (defn conn-handler [conn]
       (println "connecting")
       (login conn)
       (while (nil? (:exit @conn))
         (let [packet-id (.readByte (:in @conn))]
-          (handle-packet conn packet-id)
+          (read-packet conn packet-id)
           ))
       (println "done"))
 

; Packet Type Maps -----------------------------------------------------------------
(def packet-ids {
     :keepalive 0x00
     :login 0x01 
     :handshake 0x02 
})
(def packet-types (apply assoc {} (mapcat reverse packet-ids)))




; Writing Packets ------------------------------------------------------------------
(defn write-packet-keepalive [conn _]
      (writ-byte conn (:handshake packet-ids)))

(defn write-packet-handshake [conn {username :username}]
      (writ-byte conn (:handshake packet-ids))

