Replace static method and class with a function, and add a little description