Creating an efficient branching system