some parser bugs fixed and db module rewrited using PDO