file cleanup
optimized shuffle routine