Add inline comments around magic API hackery