corrected file notifications to pass full path, and some refactoring and code cleanup