     class @Title extends Backbone.View
         className: 'database-info-view'
         template: Handlebars.compile $('#database_view_title-template').html()
-        initialize: ->
+
+        # Bind listeners
+        initialize: =>
             @name = @model.get('name')
             @model.on 'change:name', @update
 
+        # Update the title if the database has a new name
         update: =>
             if @name isnt @model.get('name')
                 @name = @model.get('name')
                 @render()
 
+        # Render the view for the title
         render: =>
             @.$el.html @template
                 name: @name
             return @
 
+        # Unbind listeners
         destroy: =>
             @model.off 'change:name', @update
 

# Database view
module 'DatabaseView', ->
    class @NotFound extends Backbone.View
        className: 'section'
        template: Handlebars.compile $('#element_view-not_found-template').html()
        initialize: (id) ->
            @id = id
        render: =>
            @.$el.html @template
                id: @id
                type: 'database'
                type_url: 'databases'
                type_all_url: 'tables'
            return @

    # Container for the entire database view

        alert_tmpl: Handlebars.compile $('#modify_shards-alert-template').html()

        events: ->
            'click .close': 'close_alert'
            # operations in the dropdown menu
            'click .operations .rename': 'rename_database'
