Added support for branches and EOF