BC Var Branching implemented + Refactoring