Replace @staticmethod with global functions