Refactoring probability stuff
Further refactorings
Switching between different number types