improved tangent weights update behaviour, little code cleanup