Captcha code clean up and tweak