Starting to play with parameters, segmentation fault in very rare cases
code cleanaup and fixed a bug that was causing crash