Fix computation of log likelihood. Small style corrections.
Fix condition of hitting the brarriers whene running simulations.