Log probabilities

Replace probabilities with logs of probabilities and replace multiplication with addition. Remove some comments and print commands.