REF: reodered function so that it make more sense.
REF: Some more function reordering.
REF: use of helper function to compute the 4 plane parameters from 3 points in 3d.