Refactoring. move i_watch support code from worker.c to watch.c