Added button class, proper switch amoung states