moved random number generation code to seperate files and updated Makefile.am