sqlqueries minor fixes
postlogic and db minor fixes
file servlet code added for possible compression of images