Removed duplicate code for showing notifications.