Optimizing code
Comments and tidies up