Refined previous code.  Forgot to remove some of the code I left in the AttributesPanel.