Revised to use code optimisation via scope