Add sorting of buttons