Initial commit of statistics functions.