Cleaned notifications code