Add support for branch switching