Little refactoring in ButtonGroup class.