Refactoring inotify.