   listEntries: (params) ->
     bucket = mediator.buckets?.findWhere slug: params.slug
 
-    if bucket
-      @adjustTitle bucket.get('name')
+    return @bucketNotFound() unless bucket
+    @adjustTitle bucket.get('name')
 
-      @entries = new Entries
+    @entries = new Entries
 
-      @entries.fetch( data: {bucket: bucket.get('id')}, processData: yes ).done =>
-        @view = new EntriesList
-          collection: @entries
-          bucket: bucket
+    @entries.fetch( data: {bucket: bucket.get('id')}, processData: yes ).done =>
+      @view = new EntriesList
+        collection: @entries
+        bucket: bucket
 
   addEntry: (params) ->
     bucket = mediator.buckets?.findWhere slug: params.slug
 
-    if bucket
-      @adjustTitle 'New ' + bucket.get('singular')
+    return @bucketNotFound() unless bucket
 
-      @entry = new Entry
+    @adjustTitle 'New ' + bucket.get('singular')
 
-      @listenToOnce @entry, 'sync', =>
-        toastr.success 'Entry added'
-        @redirectTo 'buckets#listEntries', slug: bucket.get('slug')
+    @entry = new Entry
 
-      @view = new EntryEditView
-        model: @entry
-        bucket: bucket
-        user: mediator.user
+    @listenToOnce @entry, 'sync', =>
+      toastr.success 'Entry added'
+      @redirectTo 'buckets#listEntries', slug: bucket.get('slug')
+
+    @view = new EntryEditView
+      model: @entry
+      bucket: bucket
+      user: mediator.user
 
   editEntry: (params) ->
     bucket = mediator.buckets?.findWhere slug: params.slug

        toastr.success 'Bucket deleted'
        @redirectTo 'buckets#dashboard'

    if bucket
      @adjustTitle 'Edit ' + bucket.get('name')

      @reuse 'BucketSettings',
        compose: (options) ->
          console.log 'composing', arguments
          @members = new Members bucketId: bucket.get('id')
          @users = new Users
          @fields = new Fields bucket.get('fields')

          $.when(
            @members.fetch()
            @users.fetch()
          ).done =>

            @view = new BucketEditView
              model: bucket
              fields: @fields
              members: @members
              users: @users

            @view?.setActiveTab options.activeTab if options.activeTab

        check: (options) ->
          @view?.setActiveTab options.activeTab if options.activeTab
          @view?

        options:
          activeTab: params.activeTab

  missing: ->
    console.log 'Page missing!', arguments

  settings: (params) ->
    bucket = mediator.buckets?.findWhere slug: params.slug

    return @bucketNotFound unless bucket

    @listenToOnce bucket, 'sync', (bucket, data) =>
      mediator.buckets.fetch(reset: yes)

