100% clean build of Windows x86 and x64

Changes include:

* Project file updates.
* Removal of warnings due to casting and incompatible argument types.
* Code formatting to make intent more clear.

Let's keep it clean!