Cleaned up notification code