Finished error calculation and calculating change of weights.
Added weight updating