Fixed compilation in VC2008.

Also removed an unused inline header file (yuck).
merged in more warning fixes