 #   hubot tc list projects - Show all available projects
 #   hubot tc list buildTypes - Show all available build types
 #   hubot tc list buildTypes of <project> - Show all available build types for the specified project
-#   hubot tc list builds <buildType> <number> - Show the status of the last <number> builds. Number defaults to five.
-#   hubot tc list builds of <buildType> of <project> <number>- Show the status of the last <number> builds of the specified build type of the specified project. <number> Defined to 5
+#   hubot tc list builds <buildType> <number> - Show the status of the last <number> builds.  Number defaults to five.
+#   hubot tc list builds of <buildType> of <project> <number>- Show the status of the last <number> builds of the specified build type of the specified project. Number can only follow the last variable, so if project is not passed, number must follow buildType directly. <number> Defaults to 5
 #   hubot tc build start <buildType> - Adds a build to the queue for the specified build type
 #   hubot tc build start <buildType> of <project> - Adds a build to the queue for the specified build type of the specified project
 #   hubot tc build stop all <buildType> of <project> - Stops all currently running builds of a given buildType. Project parameter is optional.
 #   hubot tc build stop <buildType> <buildId> of <project> - Stops the build type of project with the buildId if currently running. Project parameter is optional.
 #
-# Authors:
+# Autho:
 #   Micah Martin and Jens Jahnke
-#Contributors:
-#   Abraham Polishchuk
 
 util           = require 'util'
 _              = require 'underscore'

    url = "#{base_url}/httpAuth/app/rest#{projectSegment}/buildTypes/name:#{encodeURIComponent(configuration)}/builds"
    msg.http(url)
      .headers(getAuthHeader())
      .query(locator: ["lookupLimit:5","running:any"].join(","))
      .get() (err, res, body) ->
        err = body unless res.statusCode == 200
        builds = JSON.parse(body).build unless err

        buildTypes = JSON.parse(body).buildType unless err
        callback err, msg, buildTypes

  getBuilds = (msg, project, configuration, amount, callback) ->
    projectSegment = ''
    if project?
      projectSegment = "/projects/name:#{encodeURIComponent(project)}"
