Replace the MAF sensor first and see if the KS code goes away. Remember, the KS will only trigger a fault code but don't turn on the CEL. So when the ECU and CEL have been cleared when the MAF sensor was replaced, have an OBD scan and see if you still have the KS fault code.
You have a choice of buying refurbished MAF sensor from Napa for @ $200+ (you have to surrender the old MAF sensor) or buy new at discounted price from Ios - infinitipartsUSA.com for @ $450.
If the KS problem persists, look for the FAQ 'sticky' in this forum on how to replace it. Also, you can refer to the YouTube video of a KS replacement on a Maxima 4th Gen (same engine as I30). The 2 videos are courtesy of "boredmder."
http://www.youtube.com/watch?v=R2ntaxi7bXk
http://www.youtube.com/watch?v=fPIMOIwLISc