Introduced some code for calculating normals

it doesn't work yet, but it is a start