Adding basic daemon support to server