Fix a bug where a slightly different jitter was returned
Fix call to posterior fun
simplify log fun
clean up and new optimization trials