add/update comments + minor code improvement
Merge branch 'headless' into sbt-0.13.1