Refactor how screen and terminal contexts are handled