Change normals to be computed in counter-clockwise order and minor refactoring.