shuffle: add copyright, minor code cleanups