Now uses greedy replacement. Fixes #1

I forgot to re-push the actual application, so this also Fixes #2