code cleanup and comments

Hi Sam,

I have completed the code cleanup of the source tree. There a few namespaces and directory changes that could be made, but I think this is a big improvement.

Regards
Craig.