Refactoring complete for now. Computation of weighted centroids, weighted correlation has
been moved to Plane, and the fillPlane routine as well (which is much simpler now).
Code compiles and runs correctly on mac. I do not know if segmentation fault has been fixed or not.