Fixed database problems, retesting api connections