Performance improved a lot. Added image viewer with zoom. Minor fixes. Code cleaned.