Use explicit casting of real to numeral types
Fix initialization order
Preliminary multi threading for RaytraceRenderer