Made changes to API so it uses mysqli