cleans up daemonizing logic and improves hx interface