Fixes to the log likelihood calculation
 - changed N_total to N_max
 - changed data_i to v_data
 - changed data_term to data_i
 - deployed Emyr's fix for the log likelihood calculation