change to serve_forever, small fixes in templates