Code cleanup; restructure user notification.