Refactor: Call system APIs via function pointer variables.