* moved server logic to internal packages * split the main server and the http server * handling signals for shutting down