Modified cookies class so its more readable.