Made branch an optional parameter; added options parameter