Recast loose functions into a class