Probability calculations from step to step probably works now, but refactoring is needed.