Refactored pickButtonClasses filter