Add daemon and server code