I am in the process of cleaning this up. This code originally came from an open source tutorial on Lighthouse3d... 

I've cleaned Plane up, but still need to clean this one up.