- adjusted rects for facedetection
- refactored some code