Added functions to serve and stop serving.