Making the code more D compliant. Fixed issues between 32 and 64 bits.