Added more utility randomization functions and organized code.