Profile Updates

Pre-implemented profile code to do different things depending on if it
is the first time the profile is being added or if it is an update.