Add shuffle as a function
don't print soft warnings when debug disabled
improve comment