Restructured inotify handler into classes appropriate for this application.