Modifying to extract out terminal into a Swing component that can be
embedded into different frames as needed - this will break certain
functionality