Some small changes to get it running from the server in seperate php, css and js files.