Fixed random number generator for 64 bit
fixed res painting (more trouble with 64 bit pointers for random)
fixed reading of option codes