Extracted some methods in the watcher.