Terminal updates

Fixes issues with the terminal, code parsing, and stack traces.