Reworking loops to stop overwrite

Signed-off-by: Richard Walker <richard@monkeybruiser.co.uk>
Merge pull request #3 from Monkeybruiser/cookiesOption

Reworking loops to stop overwrite