removed a lot of code duplication
using only one thread when debuging
implemented Uniform sampler

...not tested yet
wrote test for uniform sampler

...and found bug