Format code to make more readable in different viewers.
Small change to button handling in GUI.