Moved weight update

The weight update is now contained within the weight class.