```coffeescript
FactlinkApp.module "DiscussionModalOnFrontend", (DiscussionModalOnFrontend, MyApp, Backbone, Marionette, $, _) ->

  background_page_url = null

  DiscussionModalOnFrontend.addInitializer ->
    background_page_url = currentUser.streamLink()

    FactlinkApp.vent.on 'close_discussion_modal', ->
      Backbone.history.navigate background_page_url, false
      FactlinkApp.discussionModalRegion.close()

  DiscussionModalOnFrontend.openDiscussion = (fact, url) ->
    Backbone.history.navigate fact.get('url'), false
    background_page_url = Backbone.history.getFragment(url) if url?
    newClientModal = new DiscussionModalContainer
    FactlinkApp.discussionModalRegion.show newClientModal
    newClientModal.mainRegion.show new NDPDiscussionView model: fact

  # HACK: This assumes that we use "navigate url, true" for all url changes that
  # leave the main regions alone (sidebar, mainRegion, etc)
  DiscussionModalOnFrontend.loadUrlStopRouting = (fragment) ->
    FactlinkApp.discussionModalRegion.close()

    if fragment == background_page_url
      background_page_url = null
      true
    else
      background_page_url = null
      false
```

Use clearer default for url
user
```coffeescript
FactlinkApp.module "DiscussionModalOnFrontend", (DiscussionModalOnFrontend, MyApp, Backbone, Marionette, $, _) ->

  background_page_url = null

  DiscussionModalOnFrontend.addInitializer ->
    background_page_url = currentUser.streamLink()

    FactlinkApp.vent.on 'close_discussion_modal', ->
      Backbone.history.navigate background_page_url, false
      FactlinkApp.discussionModalRegion.close()

  DiscussionModalOnFrontend.openDiscussion = (fact, url=background_page_url) ->
    Backbone.history.navigate fact.get('url'), false
    background_page_url = Backbone.history.getFragment(url)

    newClientModal = new DiscussionModalContainer
    FactlinkApp.discussionModalRegion.show newClientModal
    newClientModal.mainRegion.show new NDPDiscussionView model: fact

  # HACK: This assumes that we use "navigate url, true" for all url changes that
  # leave the main regions alone (sidebar, mainRegion, etc)
  DiscussionModalOnFrontend.loadUrlStopRouting = (fragment) ->
    FactlinkApp.discussionModalRegion.close()

    if fragment == background_page_url
      background_page_url = null
      true
    else
      background_page_url = null
      false
```
assistant