added debug log and flags in command line; various fixes and more debugging info
zoomed mode improvements - it still needs some work