[ymeng] Refactor static functions to instance methods