Convert stand along functions to class or instance methods of Parser