Made dealing with branching easier. Added support for generated id's