Refactoring 'copyClasses' implementation

Took Greg's advice and used a if/then/else rather than a switch.  Also
changed so that unknown values do nothing, rather than copying classes
to button.