absorbed gui.c into library.c