Fix some 64-bit issues.
Stub out more missing functions.
Define DoubleCondition.