Cleaned up function calls in pexpect scripts.