more cleanup to server.js. removed old unused http code stuff (made a local backup though in case we need it later)