Removed deprecated SQL helper and replaced some old queries by PetaPoco queries