Completed the migration of the backpropagation implementation.