Minor fix in DB, added more ajax