Cleanup
Part 3a (plus fix for part 1b - doesn't affect results)
Part 3 complete
Log probabilities (doesn't affect results)