Some more minor tweaks.
Reversed some tests that were accidentally commited
Fixed the formula for the distribution function