Generalized chain combinator and added extend combinator
Fixed merge conflicts