Added random cube generation.
Added global random generator.