Fix and reorganize

Fix captcha, reorganize misc functions a bit