Solved some bugs in the code with Fabio. He will continue later.