Reworked normal generation code so that it matches LW approach