Fix pointers and added size checks
Documentation and spacing changes
Change NormalGenerator creation