Fix malloc argument.
Move random seed setting to main().
Merge.