Packaging functions to a class