GH #185, moved other statistics functions to separate module