Changed some int types and fixed casting
Added 64-Bit arch