Improve data flow and notification logic