Fix branch pipe construction within loops
Fix element type of second branch. Add branch method to elements