 
     @render()
 
+  backToTop: =>
+    @back() while @stack.length > 1
+
   render: =>
-    program.clear()
-
     @stack.push @configuration unless @stack.length
     model = _.last @stack
 
+    top = @header?.height or 0
+
     window = blessed.list
+      top: top
+      left: 0
+      height: screen.lines - top
       itemFg: 'cyan'
       selectedFg: 'white'
       selectedBg: 'blue'


    for key in keys
      value = model[key]
      window.add key + '[' + typeof value + ']' + ' = ' + value.toString()

    window.key 'h', @back

    window.on 'select', @selected keys, model

    window.focus()
    screen.render()

  initialize: (@configuration) ->
    window.detach() while window = @windows.pop() if @windows?

    @stack = []
    @windows = []

    @render()

  @main: ->

    {argv} = yargs

    configurationFileName = _.first argv._
    winston.debug 'Loading ' + chalk.white configurationFileName

    prefer.load configurationFileName, (err, configurator) ->
      throw err if err?
      new PreferCommandLineInterface configurationFileName, configurator


module.exports.main = PreferCommandLineInterface.main
