Improved Comet so that it uses new DB API, worked on cursor support for DB api