Imrpove readability of the code and avoid visual studio warni…

…ng c4996 I don't think this can cause trouble with gcc but let me know if its the case.