Set warning level of VS to 4 and fix more warnings
Revert some changes and fix a default return value