The indenting in this file was inconsistent, so I altered that, but only the snippet below is a change/addition, see comment