Implementation of TablePopulation for sampling a single element
Implementation of TablePopulation sampling multiple elements
Tidied and fixed bug in TablePopulation