captcha bug fix, code cleanup, and obsufaction