         listTasks[t.list].push(t)
     return listTasks
 
-# Most of the following was cribbed from
+#############################
+# Shows errors if they occur
 showError: (err) ->
 	if @content
 		@content.html '<div class="error">' + err + '</div>'
 
+#############################
+# Wrapper div
 render: (output) -> """
 	<div class='reminders-wrap'>
 	</div>
 """
 
+#############################
+# Launch Reminders on click
 afterRender: (domEl)->
   $(domEl).on 'click', => @run "open /Applications/Reminders.app"

# Externalize styles for more flexibility
# Current options are:
# - reminders.widget/styles/default.css (original style)
# - reminders.widget/styles/sidebar.css (sidebar style)
style: """
    @import url(reminders.widget/styles/default.css);
"""

update: (output, domEl) ->
    # Widget Settings
    tasksPerList = 0    # Number of tasks to show per list, 0 for all
    showNotes = true   # Whether notes get shown. Either true or false
    listsToNotShow = [] # Or leave empty as [] to show all
    monthBeforeDay = false # For American's and such. Either true or false

    # Do not alter below here
    str = '<ul class="lists">'
    listNameTpl = ''
    reminders = JSON.parse(output)

    str += '</ul>'
    @content.html(str)

#############################
# Command
command: 'reminders.widget/pending.sh'

#############################
# Transforms kludgy JSON from pending.sh
# into something more reasonable.
# TODO: Fix the shell script
tasksByList: (output) ->
    reminders = JSON.parse(output)
    listTasks = {}
