Add origin_head parameter everywhere

Also moved the origin_head parameter to be after the layout parameter if
the function has one.