made branch optional
added comments
updated for moz.com, ruby 1.8.7