Fixed some stuff (now compiling on Linux)

Silent warnings
Changed strcpy_s to strncpy
Fixed some other minor stuff