Extract command singleton system to daemon lib