Updated doc, fixed bug of not returning $this from a branch.