Refactor some global functions to a class