Create ui.c

You'll see a lot of input guards that are commented just because I haven't found a good way of doing it.