Refactor|Materials: Continued cleanup refactorings
Fixed|Server|Windows: Server depends on DirectX

Seemingly the server is still dependent on DirectX? (or at the least
it still includes files from the SDK)

Plus some minor warning fixes.