Added likelihood calculations, made minor modifications to logic of program