                 controller:  'SubjectListCtrl'
 
           # The subject state.
-          # TODO - child states always fetch the subject, even if
-          # called in a context with the fetched subject. Can this
-          # be avoided? Does the ui-router go function have an
-          # option to supply a subject argument and thereby forego
-          # the subject fetch resolution? 
           .state 'quip.subject',
             url: '/:collection/subject/{subject:[0-9]+}?id'
             resolve:

              registration: (scan, $stateParams, Router) ->
                Router.getRegistration(scan, $stateParams.registration)

          # The scan image detail page.
          .state 'quip.subject.session.scan.image',
            url: '/image/{timePoint:[1-9][0-9]*}'
            resolve:
              image: (scan, $stateParams, Router) ->
                timePoint = parseInt($stateParams.timePoint)
                Router.getImageDetail(scan, timePoint)
            views:
              'main@':
                templateUrl: '/partials/image-detail.html'
                controller:  'ImageDetailCtrl'

          # The registration image detail page.
          .state 'quip.subject.session.scan.registration.image',
            url: '/image/{timePoint:[1-9][0-9]*}'
            resolve:
              image: (registration, $stateParams, Router) ->
                timePoint = parseInt($stateParams.timePoint)
                Router.getImageDetail(registration, timePoint)
            views:
              'main@':
                templateUrl: '/partials/image-detail.html'
                controller:  'ImageDetailCtrl'

        # Redirect an URL with trailing slash to an URL without it.
        $urlRouterProvider.rule ($injector, $location) ->

                controller:  'SubjectDetailCtrl'

          # The session state.
          # The session state parameter is the session number.
          .state 'quip.subject.session',
            url: '/session/{session:[0-9]+}'
            resolve:
