
a while, awhile
This is a tricky one. 'A while' is a noun phrase. 'Awhile' is an adverb. 'A while' refers to a length of time. Snake Eyes left the G.I. Joe team for a while. 'Awhile' means 'for a time.' Snake Eyes left the G.I. Joe team awhile. See that subtle difference? If there's a preposition (in this case, 'for') use 'a while.'
Now check out these two sentences. It took a while to sift through the wreckage. It took awhile to sift through the wreckage. They're both correct. The noun phrase is functioning like an adverb. Personally, I stick with the adverb in this case.