create the connection to db and clean up

cleaned up a few files and folder
created header

linled index to header