Xcp_service refactoring

Work done while trying to find the squeezed issue. Should be an improvement over the original code (basically, cleaner code, daemonize function a bit more like Stevens like it)