Move Empty Gif logic to a file
Fix cookie test