Python wrapper works properly with parallel

A bug was found in the c-code that didn't allow parallelization
and was changed here.

Needed to do: update the examples folder, clean up a bit the main.py
and the subroutines it calls