Refactored legacy app to watch for a directory.