Various shell and terminal cleanups