Add log-likelihood function, unit tests