refactored generative process to use the same data structures as for inference
some refactoring, and added a first test to check the behavior of the gibbs updates on artificial data