organized callbacks into class, made gui pointers static