Fixes #1624. Use python3 shebang for all python scripts as python still defaults to python2 on many systems.
Fixes #1133
So now hori matches both "hori" and "horizontal". Switched to a prefix-trie internally.