add -O for normal build on examples
rework envelope pruning as an optional heuristic