some improvements in recognition, cleaned up some code
cleaned the code, made some changes in image resize/scale