Split webserver.run into prepare+start and add stop function