         ; remove the lesson <div>s
         (remove-lesson-group-html augTTLessonInfoSeq)
 
-        ; Remove module from `ModulesSelected`
-        (set! ModulesSelected (dissoc ModulesSelected moduleCode))
-
         (.log js/console "Reached here man")
 
         ; Perform shifting due to removal of lesson <div>s

    ; adjust rowspan of <th>
    (attr $thElem "rowspan" (max nrNonEmptyRows 2))))

(defn- update-ModulesSelected-for-affected-days!
  "Given a set of days that may possibly be affected by removal and shifting of
   lessons, update the individual entries in the `ModulesSelected` global."
  [affectedDaysSet]
  (doseq [day affectedDaysSet]
    (doseq [[rowIdx ttRow] (timetable-enumerate-rows-in-day day)]
      (doseq [[{:keys [moduleCode lessonType lessonGroup
                       startTime endTime]} _] ttRow]
        (set! ModulesSelected
              (update-in
                ModulesSelected
                [moduleCode lessonType :info]
                (fn [modSelLessonInfoSeq]
                  (conj (filter (fn [modSelLessonInfo]
                                  (or (not= (:day modSelLessonInfo) day)
                                      (not= (:startTime modSelLessonInfo)
                                            startTime)
                                      (not= (:endTime modSelLessonInfo)
                                            endTime)))
                                modSelLessonInfoSeq)
                        {:day day,
                         :rowNum rowIdx,
                         :startTime startTime,
                         :endTime endTime}))))))))

(defn- create-lesson-div
  "Creates a <div> element for a new lesson using jQuery"
  [& {:keys [moduleCode moduleName lessonType lessonGroup venue slotsOcc

        (overall-timetable-prune-empty-rows affectedDaysSet)
        (.log js/console "Whats up")

        (remove-module-from-ModulesSelected! moduleCode affectedDaysSet)
        (.log js/console "Boo ya!")
        (.log js/console (str "ModulesSelected:" (.stringify js/JSON (clj->js ModulesSelected))))

