Some refactoring

Class PathTracer has some methods, which can be used by PathTracerDirect
(which solves tasks 1-3), or some new derived class (for task 4 - to be done)