Added newline to files not ending in newline.

... To prevent compiler warnings in projects that check for this.
Prevent compiler warning when building for 64bit
Fix shadowing variable warning.