Code cleanup.

Change the code style and make more clean for indentation.
Support the button disable feature.