    :aout [:aout]
    :pwm  [:pwm]})
 
-(declare current-pin-modes)
+
+;; Here we're going to declare some of the things we'll need in the implementation that we'd rather leave at
+;; the end of this namespace for logical flow.
+
+(declare current-pin-modes current-pin-mode writeable-pin? ok-val?)
 
 (defmulti read-pin*
   "Inner method for reading from a pin; dispatches on pin mode"
   (fn [board pin-n]
     (get (current-pin-modes board) pin-n)))
 
-(declare current-pin-mode writeable-pin? ok-val?)
+
+;; In addition to the standard protocol functions, we also need something which let's us set the state of
+;; _input_ input pins for the purposes of simulation, since (for obvious reasons) this is not supported via
+;; the standard protocols.
 
 (defprotocol PSimControl
   "Protocol for simulation control functions"
   (set-state! [this pin-n val] "Set the state of a digital or analog input pin"))
 
+
+;; And now the implementation.
 
 (defrecord SimBoard
   [pin-state pin-modes edge-channels config]

             [protocols :as pcp]
             [implementation :as impl]]
            [clojure.core.async :as async :refer [chan >!! <!! go <! >! go-loop]]))

(def full-available-modes
  #{:input :output :input-rising :input-falling :input-both :ain :aout :pwm})

                   (< (Math/pow 2 (get-bits board pin-n)))))
    false))


;; How we create new boards

(defn sim-board
  [config]
  (SimBoard.
