Turned dbconnect.php into a class file

Added some other files with minor changes