Added more tests and tweaked behavior of the branching words