Adding a main function and root UI window -- together in one.