Done some optimisation

Reggerssion tested - still works