Rewrite webserver and Minor fix