Refractor edd_process_profile_editor_updates()

Wasn't happy with the original. Hope this will do.