daemon-rewrite: Fix setup, forking and API/getPlotValues2