Made buttons configuration more flexible.