Minor refactoring of the watcher implementation