diff --git a/js/customElements/newComment.js b/js/customElements/newComment.js
index 2d1e8c3086211570516125f60b2b866f768fa8fa..92a6e27d9d4000c6a8a7d73d673b28bd555b2af6 100644
--- a/js/customElements/newComment.js
+++ b/js/customElements/newComment.js
@@ -8,7 +8,7 @@ class newComment extends HTMLElement {
         let sitekey = await (await fetch("/API/config.php?name=sitekey")).text();
 
         this.innerHTML = ` 
-            <form action="/newComment.php" method="post">
+            <form action="/API/newComment.php" method="post">
                 <label for="name">Name:</label><br>
                 <input type="text" id="name" name="name"><br><br>
         
diff --git a/public/newComment.php b/public/API/newComment.php
similarity index 94%
rename from public/newComment.php
rename to public/API/newComment.php
index acb7b49e91f8acd5c773305b29a58d36bd7c5814..860a81b15436493788daff557ce87f2aa84ec541 100644
--- a/public/newComment.php
+++ b/public/API/newComment.php
@@ -1,5 +1,6 @@
 <?php
-include("./internal/mysql.php");
+include("./lib/config.php");
+include("./lib/mysql.php");
 
 $data = array(
     'secret' => $secretkey,
diff --git a/public/index.php b/public/index.php
index 74bfda6e39bd1ca79a45f94eb70a5b128e5037ea..19fec503ecd6ed3e6f92768bbe8e89875cc45558 100644
--- a/public/index.php
+++ b/public/index.php
@@ -1,7 +1,6 @@
 <?php
 include "internal/header.php";
 include "internal/footer.php";
-include "internal/mysql.php";
 
 getHeader("Jonas Leder", "home");
 ?>
diff --git a/public/internal/mysql.php b/public/internal/mysql.php
deleted file mode 100644
index 5c1d19b9565e338f9ad1b2864577e9b57abea78c..0000000000000000000000000000000000000000
--- a/public/internal/mysql.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-include "config.php";
-
-$conn = new mysqli($mysqlServer, $mysqlUser, $mysqlPassword, $mysqlDatabase);
-// Check connection
-if ($conn->connect_error) {
-    include "500.php";
-
-    header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);
-    die(getError500());
-}
diff --git a/public/post.php b/public/post.php
index e89af9d3026142bb2fda6527850825a7b5883444..ffc7ad02622d234c3c112d60834abd22e12714c5 100644
--- a/public/post.php
+++ b/public/post.php
@@ -1,5 +1,4 @@
 <?php
-include "internal/mysql.php";
 include "internal/header.php";
 include "internal/footer.php";