Reorganizing the file structure

Also adding the server side PHP scripts that query the database