Implemented branch-switching.