Refactoring recaptcha