Fix shuf() to use random.shuffle() and fix code style