Copied over files from gifsockets