Implemented the remainder of the --random command