WL-2653 Just tidy up some code.

No real changes, but while investigating the issues I updated a few things.