Removed more from callbacks, moved to terminal.c