Fixing up C++ likelihood function.
Minor changes.