Changed fail! to panic!
Fixed crash with API change in gen_rand(). Added two new files.