First cut at recursive button choosing
wip
wip
wip: performance is still unusable
rewrote recursion. Now runs in reasonable time.