             if index < thread.posts.length
               post = thread.posts[index]
               content = showdown.makeHtml(post.source)
-              context.get_user post.username, (post_user) ->
-                context.render('templates/post.template', {post: {content: content, date: format_date(post.date), user: post_user}}).then (post) ->
+              context.getUser post.username, (postUser) ->
+                context.render('templates/post.template', {post: {content: content, date: formatDate(post.date), user: postUser}}).then (post) ->
                   $(post).appendTo('.thread')
                   render0(index + 1)
             else


  @before (context) ->
    @user = @session('user')
    @get_user = (username, data) -> get_user.apply(@, [username, data])
    if context.path != '#/login'
      if !@user
        $('.user-info').fadeOut()

  @use 'Storage'
  @use 'Session'

  getUser = (username, cb) ->
    user = @session('user/' + username)
    if user
      cb(user)
    else
      $.get('/user/' + username, {}, (data) -> cb(data))

  formatDate = (timestamp) ->
    pad = (number) ->
      if number < 10 
        '0' + number
