even more 64-bit fixes plus removed a few unnecessary NSUIntegers