More optimizations to speedup interface terminals
Merge pull request #246 from yueh/fix-227

More optimizations to speedup interface terminals