            items (array)]
       (let [entity-id (first entities)]
         (if (nil? entity-id)
-          (rbush-bulk-insert! index items)
+          (r/rbush-bulk-insert! index items)
           (let [move-state (get moveable-states entity-id)
                 collision-state (get collidable-states entity-id)]
             (when (not (and (nil? move-state) (nil? collision-state)))

      (if item
        (if (valid-collision-item? item width height)
          (let [id (:id (nth item 4))
                collisions (rbush-search spatial-index item)]
            (if (some #(and (not-self? id %) (not-self-attack? id %))
                      collisions)
              (recur (rest items)
                     (assoc! accum id [(ev/mk-event {:collisions collisions}

       (not (attack? attributes))
       (not (keyword-identical? id (:from-id attributes)))))

(defn self? [id item]
  (keyword-identical? id (:id (nth item 4))))

(defn self-attack? [id item]
  (keyword-identical? id (get-in (nth item 4) [:attributes :from-id])))

(defn collision-events
  "Returns a hashmap of all collision events by entity ID"
