Initial daemon implementation (untested yet)