BUGFIXES related to previous commits, moved some stuff around to make things gtk-less runable