Added likelihood calculations, made minor modifications to logic of prog...

...ram