Some minor changes:
added random test
added set interface
added testlib.h - now rnd.next() is used instead of rand()
fixed some errors
I've done something else but I can't remember what exsactly