Small Performance improvements

Hi I've made some small performance improvements, please have a look