Added architecture-safe method for pointer lookup

Also retrofitted code to function successfully on both 32-bit and 64-bit
files (I think).