Fix random
Small clean up
Remove unused functions
Remove unused functions