Various fixes. Added basic query servlet.