EIJI's branch-breaking code