Just found a bug. How to reproduce:
Choose any type of elf. (I found this bug using wood elf).
Choose a background that has Perception for a bonus skill.
Now, you change your mind and choose a different background (one that does not have Perception as a bonus skill).
Result: Perception is no longer marked as a trained skill.
The skill gained by choosing a race should never be lost when changing backgrounds that also include that skill to backgrounds that don't.
Does that make sense?
According to PH page 125 under proficiencies third paragraph: If a character would gain the same proficiency from two different sources, he or she can choose a different proficiency of the same kind (skill or tool) instead. (P.S. This is one of those overlooked rules when creating characters. Even I didn't know about it until recently.)
In other words, there should be code that allows the choice of a different skill if that skill is duplicated.
Example: Elf gives proficiency in Perception, Sailor also gives proficiency in Perception. This means the character can choose a different skill other than Perception.
Since that is the case, there should be some way of "unchoosing" the new skill when a different background is chosen.
This still gives rise to my suggestion from an earlier post (I forget which one) of when a class is chosen, there should be some pop up to show which skills are allowed for that class. This should also allow for skills already gained by race and background.