Formatted. Still needs some refactoring here and there. Added author in
randomize given code.