I realise now this should be keyed off exchange arguments, but I want to go home and I hate leaving things uncommitted.
Derp, use arguments rather than environment. And add a touch of documentation.
Typo
Remove unused variables
More doc
Merged bug25392
Don't repeat yourself.
Merge heads
Merged bug25044