Now db class is using singleton technique and ajax request goes through index