Remove reliance on Stats module, using StatsBase instead