The colors are now rendered according to the paper! :D
Math and flame.
Moved lots of math functions to a separate file. Still reasearching why addToHist is so slow.