Added random function
Removed debug output
Removed debug output