Replace cobra_functions with stats.
Remove cobra_functions.