Fixed a backspace bug and moved the big buffer-operation-choosing switch statement in screen.c into it's own function