dock-daemon: refactor code, add setProperty()