Modified flow when adding an item.
Added pub/sub mechanism.