Refactor Code and Added Notifications