Cleanup. Added test case for pty support