refactoring - part 3.
Also, integrated code relative to the camera pose estimation. Still
testing this one though.