Changed to use pty.js