fix the bug in ListBranches; corresponding tests
add TODO in RemoveBranch