playing with quotes to make tests run...
diffs are explanatory
major deduplication of code; some problems yet remain