improve simple server and template