Re: #1703 - optimisation & code tidy