Explain S. King's "Dreamcatcher?"

I read this one recently, but not under the best circumstances for concentration. Would somebody be good enough to clarify for me what the hell was going on with the byrus/Mr. Gray and with Duddits and the other boys? If the byrus wasn’t intelligent, how did it get the ships, flashlights and so on? Things more or less seemed to make sense until the epilogue. Now I’m confused. Any help is greatly appreciated/