64 bit and code tidy