Modified some things so it works with MSVC

Comment with : // Variable created here :'( , are just there because i don't like creating variable in the middle of a function in C (I prefer to put them only at the beginning).