Captcha-functions transferred to own function to reduce tangled code