Further mods to ensure 64 bit safe running. Also added a commandline
test app mode in random.cc that can be enabled if wished.