Tidied up as per PR comments.