Removed a bunch of mysqli_querry calls