Cleaned up unused code in random.js