Normalized file name case in #includes.
Converted some pointers to references.
Added explicit comparisons to null or zero.
Improved safety and reduced compiler warnings by tweaking calls to string manipulation functions.