BSP and collision detection

Hello, everyone:

I am doing the BSP trees and collision detection in openGL. I tried to understand the algorithm, but it is hard to be implemented.

I have downloaded the Fly3D game engine but the code for BSP trees is hard to understand. Can anyone help me by suggesting a straight-forward tutorial of BSP trees and collision detection with sample code?

Thanks in advance