Changes based on offline discussion with @shunter.
Fix tests.