Improved Poisson function and explicitly converted some integers to floats. Calculations should now be correct ;-)