Small rewrite of server.js to fix memory leak
Fixed debuglogging and upgraded express app config