Added random utils,  and more tests