Add rand() data set generator
Fix a couple bugs, comments