Set warning level of VS to 4 and fix more warnings