Revise code to dynamically work with 64 and 32 bit systems.