More work on GUI.
Added some messages to asserts.