Tidy code a bit.
Reinstate body previously removed from poor refactoring.