Fixed few memory glitches and added binomial distribution