Disable CRT secure deprecation warnings
Fix some compile errors