Added button state protocols.
Reforamtted.
Reformatted.