Refactor for proper local http server start/stop.