updated project to 64-bit, casted some variables to make the software compliant with 64-bit