Improved accuracy of ud_head. Partially implemented fwd_flw.