GUI code rearrange.

For tutorial stuff.