Added encapsulation for buttons array.