Add dealloc, fix recognizeText leak and add functionality