Fixed macro
Exposed parameters for local untangle, minor edits