Clean up: include guards, unused files. various fixes after running static analysis on gamecode: variable name collisions, buffer overruns, logic errors, access violations